package com.ebook.ui.fragment.home.littlebookcase;

import com.ebook.ui.fragment.Fragment;

import javax.swing.*;
import java.awt.*;

public class LittleBookCase extends Fragment {
    private RecentReadBook recentReadBook;
    public LittleBookCase(){
        super();
        initComponents();
        this.setBounds(1071,90,120,390);
//        setBackground(Color.ORANGE);//被子元素覆盖,没有必要为其设置颜色
    }
    @Override
    public void initComponents(){
        JLabel bookCaseLink = new JLabel("我的书架",SwingConstants.CENTER);
        bookCaseLink.setBackground(Color.orange);
        bookCaseLink.setOpaque(true);
        bookCaseLink.setForeground(Color.WHITE);
        bookCaseLink.setBounds(0,0,120,50);
        this.add(bookCaseLink);
        recentReadBook = new RecentReadBook();
        this.add(recentReadBook);
    }

    public RecentReadBook getRecentReadBook() {
        return recentReadBook;
    }

    public void setRecentReadBook(RecentReadBook recentReadBook) {
        this.recentReadBook = recentReadBook;
    }
}
